﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace 桌面视频录制
{
    [Serializable]
    public class DrawParallelogramWithFill : DrawParallelogram
    {
        public DrawParallelogramWithFill(Point leftUpPoint)
            : base(leftUpPoint)  { }
        public override void Draw(Graphics g)
        {
            Brush brush = DrawBrush.GetBrush();
            g.FillPolygon(brush, new Point[] { leftUpPoint, rightUpPoint, rightDownPoint, leftDownPoint }); ;
            brush.Dispose();
        }
        public override string ToString()
        {
            string printMsg = "[实菱(" + this.leftUpPoint.X + "," + this.leftUpPoint.Y + ")]->[ID:" + this.Id + "]";
            return printMsg;
        }
        public override string GetDrawObjectMsg()
        {
            string drawObjectMsg = "实菱->起始位置(" + this.leftUpPoint.X + "," + this.leftUpPoint.Y + "),宽高(" + this.width + "," + this.height + "),偏移角度:" + ((int)(angle * 180 / Math.PI)) + "°";
            return drawObjectMsg;
        }
    }
}
